-
Notifications
You must be signed in to change notification settings - Fork 3.4k
feat: add support for Angular 21 #33004
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
ea970e7 to
0f3772b
Compare
cypress
|
||||||||||||||||||||||||||||||||||||||||
| Project |
cypress
|
| Branch Review |
feat/support_angular_21
|
| Run status |
|
| Run duration | 19m 15s |
| Commit |
|
| Committer | Bill Glesias |
| View all properties for this run ↗︎ | |
| Test results | |
|---|---|
|
|
0
|
|
|
2
|
|
|
27
|
|
|
0
|
|
|
798
|
| View all changes introduced in this branch ↗︎ | |
UI Coverage
62.34%
|
|
|---|---|
|
|
27
|
|
|
48
|
Accessibility
99.03%
|
|
|---|---|
|
|
0 critical
3 serious
1 moderate
0 minor
|
|
|
19
|
0f3772b to
d8271ce
Compare
d8271ce to
050dc8a
Compare
050dc8a to
da19b3f
Compare
da19b3f to
0d85a78
Compare
38907b6 to
8d18b26
Compare
| constructor (private counterService: CounterService) { | ||
| this.count$ = this.counterService.count$ | ||
| } | ||
| count = model<number>(0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Incorrect use of model signal for internal state
The model() function is used for count, but model() is specifically for two-way binding with parent components (input/output), not for internal component state. For internal state management, signal() should be used instead. This will cause the component to not work correctly as model() expects to be bound to a parent component property.
Additional details
Adds support for Angular 21 within Cypress Component testing. Right now the Angular 21 projects needs
zone.jsas adevDependencyascypress/angularcurrently only supports zone.js. I will have a follow up PR that adds a zoneless mount handler and defaults the scaffolding tocypress/angular-zonelessfor Angular 21 applicationsAs Angular 21's change detection is a bit different from the legacy implementations, I refactored some of the angular fixtures to use signals instead of observables as signals are fully supported as of angular 18+
Steps to test
use the prepublished binaries to make sure scaffolding works on a new angular 21 project
How has the user experience changed?
Users will now be able to use Angular 21 without Cypress scaffolding warnings. NOTE: this currently still requires the zone.js devDependency until the zoneless mount handler is merged down. The intent is for both of these two be shipped at the same time but the work is considered separate.
PR Tasks
cypress-documentation? chore: add angular 21 documentation cypress-documentation#6326type definitions?Note
Adds Angular 21 component testing support, updates scaffolding/deps and tests, introduces an Angular 21 system-test fixture, and updates CI filters.
system-tests/projects/angular-21fixture (withangular.json,cypress.config.ts,package.json,tsconfig.json).21incomponent_testing_spec.tsmatrix and WDS e2e (angular.cy.ts).angular-21.fetch; removeHttpClient/service where unnecessary.componentRef.setInputand dropHttpClientModuleimports; removecounter.service.angularHandlertests for Angular 20/21 config shapes and tsconfig generation flag.@angular/*and DevKit) and detection tests.angular-20andangular-21.feat/support_angular_21and artifact persistence conditions.Written by Cursor Bugbot for commit 5d5b79a. This will update automatically on new commits. Configure here.